package malus.shaofeng.com.beiwomusic.model;

import org.json.JSONObject;

/**
 *  话题评论，评论中有对其他人的评论
 */
public class BbsReply {
    private int reply_id;
    private String content;
    private int ups;
    private User user;
    private RefReply ref_reply;
    private boolean isUps;
    public void parseJSON(JSONObject object){
        reply_id=object.optInt("reply_id");
        content=object.optString("content");
        ups=object.optInt("ups");
        user=new User();
        if(!object.isNull("user")){
            user.parseJSON(object.optJSONObject("user"));
        }
        ref_reply=new RefReply();
        if(!object.isNull("ref_reply")){
            ref_reply.parseJSON(object.optJSONObject("ref_reply"));
        }
    }

    public int getReply_id() {
        return reply_id;
    }

    public void setReply_id(int reply_id) {
        this.reply_id = reply_id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getUps() {
        return ups;
    }

    public void setUps(int ups) {
        this.ups = ups;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public RefReply getRef_reply() {
        return ref_reply;
    }

    public void setRef_reply(RefReply ref_reply) {
        this.ref_reply = ref_reply;
    }

    public boolean isUps() {
        return isUps;
    }

    public void setUps(boolean isUps) {
        this.isUps = isUps;
    }
}
